export default function barChartTemplate(seriesData1: string[], seriesData2: string[],axisData: string[]) {
    return {
        color: ['#3b9ffc'],
        tooltip: {
            trigger: 'axis',
            axisPointer: {
                type: 'shadow'
            }
        },
        legend: {
            data: ['昨日pv', '两天前pv']
        },
        grid: {
            left: '30',
            right: '30',
            bottom: '20',
            containLabel: true
        },
        toolbox: {
            show: true,
            orient: 'vertical',
            left: 'right',
            top: 'center',
        },
        calculable: true,
        yAxis: {
            splitLine: {
                show: false
            }, //去除网格线
            splitArea: {
                show: false
            }, //保留网格区域
            axisLine: {
                show: true,
                lineStyle: { //轴上的线样式
                    color: '#808492',
                    width: 0.6, //这里是为了突出显示加上的
                },
            },
            axisTick: {
                show: true
            },
            axisLabel: { //轴上的数据样式
                color: '#808492',
            },
            data: axisData,
        },
        xAxis: {
            type: 'value',
            splitLine: {
                lineStyle: {
                    type: 'dashed',
                    color: '#ddd'
                }
            },
            axisLine: {
                show: false,
                lineStyle: {
                    color: "#999"
                },
            },
            nameTextStyle: {
                color: "#999"
            },
            splitArea: {
                show: false
            }
        },
        series: [{
            type: 'bar',
            barWidth: 20, // 柱形的宽度
            barGap: 0,
            stack:'堆叠',
            data: seriesData1,
            name: '昨日pv',
        },
        {
            type: 'bar',
            barWidth: 40, // 柱形的宽度
            stack:'堆叠',
            data: seriesData2,
            name: '两天前pv',
            itemStyle: {
                normal: {
                    barBorderRadius: [0, 2, 2, 0],
                }
            }
        }
        ]
    };
}
